package com.loan.system.create.service.impl;

import com.loan.common.utils.DateUtils;
import com.loan.system.create.domain.AssistPdfSearchNhBase;
import com.loan.system.create.mapper.AssistPdfSearchNhBaseMapper;
import com.loan.system.create.service.IAssistPdfSearchNhBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * NH数据Service业务层处理
 *
 * @author Sophia
 * @date 2024-10-11
 */
@Service
public class AssistPdfSearchNhBaseServiceImpl implements IAssistPdfSearchNhBaseService {
    @Autowired
    private AssistPdfSearchNhBaseMapper assistPdfSearchNhBaseMapper;

    /**
     * 查询NH数据
     *
     * @param id NH数据主键
     * @return NH数据
     */
    @Override
    public AssistPdfSearchNhBase selectAssistPdfSearchNhBaseById(Long id) {
        return assistPdfSearchNhBaseMapper.selectAssistPdfSearchNhBaseById(id);
    }

    /**
     * 查询NH数据列表
     *
     * @param assistPdfSearchNhBase NH数据
     * @return NH数据
     */
    @Override
    public List<AssistPdfSearchNhBase> selectAssistPdfSearchNhBaseList(AssistPdfSearchNhBase assistPdfSearchNhBase) {
        return assistPdfSearchNhBaseMapper.selectAssistPdfSearchNhBaseList(assistPdfSearchNhBase);
    }

    /**
     * 新增NH数据
     *
     * @param assistPdfSearchNhBase NH数据
     * @return 结果
     */
    @Override
    public int insertAssistPdfSearchNhBase(AssistPdfSearchNhBase assistPdfSearchNhBase) {
        assistPdfSearchNhBase.setCreateTime(DateUtils.getNowDate());
        return assistPdfSearchNhBaseMapper.insertAssistPdfSearchNhBase(assistPdfSearchNhBase);
    }

    /**
     * 修改NH数据
     *
     * @param assistPdfSearchNhBase NH数据
     * @return 结果
     */
    @Override
    public int updateAssistPdfSearchNhBase(AssistPdfSearchNhBase assistPdfSearchNhBase) {
        assistPdfSearchNhBase.setUpdateTime(DateUtils.getNowDate());
        return assistPdfSearchNhBaseMapper.updateAssistPdfSearchNhBase(assistPdfSearchNhBase);
    }

    /**
     * 批量删除NH数据
     *
     * @param ids 需要删除的NH数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchNhBaseByIds(Long[] ids) {
        return assistPdfSearchNhBaseMapper.deleteAssistPdfSearchNhBaseByIds(ids);
    }

    /**
     * 删除NH数据信息
     *
     * @param id NH数据主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfSearchNhBaseById(Long id) {
        return assistPdfSearchNhBaseMapper.deleteAssistPdfSearchNhBaseById(id);
    }

    @Override
    public Integer insertSearchBaseList(List<AssistPdfSearchNhBase> searchBaseList) {
        return assistPdfSearchNhBaseMapper.insertSearchBaseList(searchBaseList);
    }
}
